package com.yzc.pve;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.yzc.pojo.Pve;
import com.yzc.pojo.Tour;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
* @author Yzc
* @description 针对表【t_pve】的数据库操作Service实现
* @createDate 2024-06-17 21:13:24
*/
@Service
public class PveServiceImpl extends ServiceImpl<PveMapper, Pve>
    implements PveService{

    @Autowired
    private PveMapper pveMapper;
    @Override
    public List<Pve> selectBypvename(Pve pvename) {

        QueryWrapper<Pve> queryWrapper = new QueryWrapper<>();
        if (pvename != null && pvename.getPvename() != null) {
            String likeValue = "%" + pvename.getPvename() + "%";
            queryWrapper.like("pvename", likeValue);
        }
       
        return pveMapper.selectList(queryWrapper);
    }

    @Override
    public List<Pve> pveloadAll() {
        QueryWrapper<Pve> queryWrapper = new QueryWrapper<>();
        return pveMapper.selectList(queryWrapper);
    }

    @Override
    public List<Pve> selectBypvenameOnaddress() {
        return pveMapper.selectBypvenameOnaddress();
    }


}




